<?php

class WLangSelect extends CWidget
{
	public function run()
	{
		$languages = Languages::model()->getLanguages();
		$langs = array();
		foreach ($languages as $lang)
		{
			$langs[$lang['code']] = $lang['name'];
		}
		$this->render('langSelect', array('currentLang' => Yii::app()->language, 'languages' => $langs));
	}
}?>
